package com.shang

/**
  * Created by shangyanshuo048 on 2017/6/20.
  */
object Test {
  def main(args: Array[String]) {
    println(matchTest(3))

    println(List(2).map{ case  2 => "ok"})

    val rs = List(2,3) map{ case 2 => "o" case 3 => "k"}
    println(rs)
  }
  def matchTest(x: Int): String = x match {
    case 1 => "one"
    case 2 => "two"
    case 3 if true => "three"
    case _ => "many"
  }
}
